import axios from "../axios";

export const loginApi =(username:String, password:String) => axios.post('/login',{
    username,
    password,
})

/**
 * @description: 发送验证码
 */
export const sendCodeApi = (phone : String) => axios.get('/sendCode', {
    params: {
        phone
    }

})

/**
 * @description: 验证验证码
 */
export const verifyCodeApi = (phone : String, code : String) => axios.get('/checkCode', {
    params: {
        phone,
        code
    }
})

/**
 * @description: 注册
 */
export const registerApi = (userName : String, password:String, mobile : String) => axios.post('/register', {
    userName,
    password,
    mobile
})

